Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service/state: Implement balance verification against AppHash #911

Merged
merged 13 commits into from
Jul 27, 2022

Conversation

renaynay
Copy link
Member

@renaynay renaynay commented Jul 15, 2022

Tl;dr, instead of requesting balance from core endpoint, the node now requests proofs as well and, using the proofs, verifies the returned balance against the AppHash of the corresponding block.

TODO:

  • Implementation
  • ADR to document use of ABCI query and proofs

Resolves #571.

Based on #910 , will rebase and mark as ready for review once merged.

@renaynay renaynay self-assigned this Jul 15, 2022
@renaynay renaynay added area:state Related to fetching state and state execution area:core_and_app Relationship with Core node and Celestia-App kind:feat Attached to feature PRs labels Jul 15, 2022
@renaynay renaynay marked this pull request as ready for review July 19, 2022 11:58
@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2022

Codecov Report

Merging #911 (2e3ccd5) into main (8d56e55) will decrease coverage by 0.40%.
The diff coverage is 19.54%.

@@            Coverage Diff             @@
##             main     #911      +/-   ##
==========================================
- Coverage   58.74%   58.34%   -0.41%     
==========================================
  Files         128      129       +1     
  Lines        7623     7727     +104     
==========================================
+ Hits         4478     4508      +30     
- Misses       2676     2750      +74     
  Partials      469      469              
Impacted Files Coverage Δ
service/rpc/state.go 0.00% <0.00%> (ø)
service/state/helpers.go 0.00% <0.00%> (ø)
service/state/core_access.go 18.32% <10.00%> (-3.03%) ⬇️
node/components.go 90.69% <100.00%> (+0.33%) ⬆️
node/state/core.go 100.00% <100.00%> (ø)
node/state/state.go 100.00% <100.00%> (ø)
service/rpc/endpoints.go 100.00% <100.00%> (ø)
service/state/service.go 47.82% <100.00%> (+2.37%) ⬆️
node/config_opts.go 28.57% <0.00%> (-11.43%) ⬇️
header/core/listener.go 52.83% <0.00%> (-5.67%) ⬇️
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

go.mod Show resolved Hide resolved
Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only reviewed this from a high-level perspective and not line by line. I'm on-board with the decisions made (reflected in the ADR) and the high-level code seems fine.

Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments from sync review:

  • Consolidate Balance methods with Verified methods(TBD in this PR)
  • Wait until syncing is done before requesting balances and responding to the users(TBD in this PR)
    • Otherwise, users will get outdated balances during sync
  • Take the latest pending Head from the Syncer and verify balances against it(Keeping it for later, needs an issue)
    • Pending headers are verified with known valset(within unbonding period) and safe to rely on
    • This way, users will be able to get balances(and other states) instantly, without waiting for sync to finish

Copy link
Member

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is verified_balance implemented? I don't actually see any code for that endpoint.

docs/adr/adr-004-state-interaction.md Outdated Show resolved Hide resolved
docs/adr/adr-004-state-interaction.md Outdated Show resolved Hide resolved
service/state/core_access.go Outdated Show resolved Hide resolved
service/state/interface.go Outdated Show resolved Hide resolved
@renaynay renaynay mentioned this pull request Jul 25, 2022
2 tasks
@renaynay
Copy link
Member Author

@adlerjohn originally, I created a separate endpoint for verified balance, but after speaking with hlib, we decided to just replace the current balance endpoint with this verified one -- so a user requesting /balance will now get their balance returned (but it's now verified against the AppHash instead of being blindly returned)

mergify bot pushed a commit to cosmos/cosmos-sdk that referenced this pull request Jul 27, 2022
… balance for a given denom (#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)
mergify bot pushed a commit to cosmos/cosmos-sdk that referenced this pull request Jul 27, 2022
… balance for a given denom (#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

# Conflicts:
#	CHANGELOG.md
#	x/bank/legacy/v043/store.go
#	x/bank/types/keys.go
@renaynay
Copy link
Member Author

@Wondertan regarding unit test for ABCI query -- the problem here is again bottlenecked by simulating tendermint+app. It will be easy to tell by using the endpoint itself whether it is working or not. I know it's not ideal, but until we can simulate this pairing easily, it will be way more work than it's worth to do this test. The underlying methods used to prove membership are covered by tests inside ibc-go here.

Ref: #570

@renaynay renaynay merged commit 718f364 into celestiaorg:main Jul 27, 2022
@renaynay renaynay deleted the verify-merkle branch July 27, 2022 13:51
rootulp pushed a commit to rootulp/celestia-node that referenced this pull request Jul 27, 2022
…stiaorg#911)

* refactor: extract HeaderGetter interface from daser into header pkg

* refactor: delete interface.go file from das pkg

* refactor: Store interface wraps getter methods

* chore: rebase fixes

* feat: add `/verified_balance` endpoint

* chore: lint

* refactor: dedup handleBalanceRequest

* docs: update state ADR

* refactor: consolidate verified_balance and balance endpoints --> verify balance by default

* chore: replace TODOs with PR refs

* refactor: apply john review comments

* refactor: extract sdk error func into helpers file, rename import aliases

* doc: update ADR header.Store -> header.Getter
tac0turtle pushed a commit to cosmos/cosmos-sdk that referenced this pull request Jul 27, 2022
… balance for a given denom (backport #12674) (#12744)

* feat: Add convenience method for constructing key to access account's balance for a given denom (#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

* updates changelog

Co-authored-by: rene <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
renaynay added a commit that referenced this pull request Jul 28, 2022
* Add GitHub CI check for Markdownlint

* Fix markdownlint errors

* Recommend VSCode extension for Markdownlint

* Convert tabs to spaces

* Remove extensions.json in favor of separate PR

* Replace JSON config with YAML for comments

* service/state: Implement balance verification against `AppHash` (#911)

* refactor: extract HeaderGetter interface from daser into header pkg

* refactor: delete interface.go file from das pkg

* refactor: Store interface wraps getter methods

* chore: rebase fixes

* feat: add `/verified_balance` endpoint

* chore: lint

* refactor: dedup handleBalanceRequest

* docs: update state ADR

* refactor: consolidate verified_balance and balance endpoints --> verify balance by default

* chore: replace TODOs with PR refs

* refactor: apply john review comments

* refactor: extract sdk error func into helpers file, rename import aliases

* doc: update ADR header.Store -> header.Getter

* Fix indentation in Go struct

Co-authored-by: rene <[email protected]>
tac0turtle added a commit to cosmos/cosmos-sdk that referenced this pull request Aug 2, 2022
… balance for a given denom (backport #12674) (#12745)

* feat: Add convenience method for constructing key to access account's balance for a given denom (#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

# Conflicts:
#	CHANGELOG.md
#	x/bank/legacy/v043/store.go
#	x/bank/types/keys.go

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>
randy75828 pushed a commit to Switcheo/cosmos-sdk that referenced this pull request Aug 10, 2022
… balance for a given denom (backport cosmos#12674) (cosmos#12745)

* feat: Add convenience method for constructing key to access account's balance for a given denom (cosmos#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

# Conflicts:
#	CHANGELOG.md
#	x/bank/legacy/v043/store.go
#	x/bank/types/keys.go

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>
johnletey added a commit to kyve-org/cosmos-sdk-old that referenced this pull request Aug 25, 2022
* Update tag.yml

* fix: update index of crisis invariant check logs (backport cosmos#12208) (cosmos#12210)

* fix: update index of crisis invariant check logs (cosmos#12208)

## Description

the info log messages describing invariant checks use the index to state
progress (eg. `asserting crisis invariants inv=0/15`). this simple change
makes them 1-indexed (eg. `asserting crisis invariants inv=1/15`).

example before:

<img width="374" alt="Screen Shot 2022-06-09 at 12 06 58 PM" src="https://user-images.githubusercontent.com/14897503/172925006-8810706c-0948-4e36-85b8-22813ccc9311.png">

Closes: #XXXX

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change - N/A
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification - N/A
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules) - N/A
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing) - N/A
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc) - N/A
- [x] updated the relevant documentation or specification - N/A
- [x] reviewed "Files changed" and left comments if necessary - N/A
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit 907df32)

# Conflicts:
#	CHANGELOG.md

* fix conflict

Co-authored-by: Robert Pirtle <[email protected]>
Co-authored-by: Julien Robert <[email protected]>

* fix: Refactor GetLastCompletedUpgrade [v0.45.x] (cosmos#12264)

* fix: defaultGenTxGas to 10 times (cosmos#12314)

* fix: edit validator bug from cli (cosmos#12317)

* chore: update release notes (cosmos#12377)

* feat: add query.GenericFilteredPaginated (backport cosmos#12253) (cosmos#12371)

* fix: update x/mint parameter validation (backport cosmos#12384) (cosmos#12396)

* chore: optimize get last completed upgrade (cosmos#12268)

* feat: improve GetLastCompletedUpgrade

* rename

* use var block

* fix: Simulation is not deterministic due to GenTx (backport cosmos#12374) (cosmos#12437)

* fix: use go install instead of go get in makefile (cosmos#12435)

* chore: fumpt sdk v45 series cosmos#12442

* feat: Move AppModule.BeginBlock and AppModule.EndBlock to extension interfaces (backport cosmos#12603) (cosmos#12638)

* feat: Move AppModule.BeginBlock and AppModule.EndBlock to extension interfaces (cosmos#12603)

## Description
Most modules right now have a no-op for AppModule.BeginBlock and AppModule.EndBlock. We should move these methods off the AppModule interface so we have less deadcode, and instead move them to extension interfaces.

1. I added `BeginBlockAppModule` and `EndBlockAppModule` interface.
2. Remove the dead-code from modules that do no implement them
3. Add type casting in the the module code to use the new interface

Closes: cosmos#12462

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit b65f3fe)

# Conflicts:
#	CHANGELOG.md
#	x/authz/module/module.go
#	x/group/module/module.go
#	x/nft/module/module.go
#	x/params/module.go
#	x/slashing/module.go
#	x/upgrade/module.go

* remove conflicts

* remove conflicts

* remove unused modules

Co-authored-by: Sishir Giri <[email protected]>
Co-authored-by: marbar3778 <[email protected]>

* feat: add message index event attribute to authz message execution (backport cosmos#12668) (cosmos#12673)

* chore(store): upgrade iavl to v0.19.0 (backport cosmos#12626) (cosmos#12697)

* feat: Add `GetParamSetIfExists` to prevent panic on breaking param changes (cosmos#12724)

* feat: Add convenience method for constructing key to access account's balance for a given denom (backport cosmos#12674) (cosmos#12745)

* feat: Add convenience method for constructing key to access account's balance for a given denom (cosmos#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

# Conflicts:
#	CHANGELOG.md
#	x/bank/legacy/v043/store.go
#	x/bank/types/keys.go

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>

* chore: bump tm in 0.45.x (cosmos#12784)

* bump tendermint version

* add changelog entry

* replace on jhump

* updates

* updates

* updates

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

* chore: 0.45.7 changelog prep (cosmos#12821)

* prepare for release

* modify release notes

* chore: migrate from registry to delegation keeper

Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Robert Pirtle <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
Co-authored-by: HaeSung <[email protected]>
Co-authored-by: likhita-809 <[email protected]>
Co-authored-by: Robert Zaremba <[email protected]>
Co-authored-by: Adu <[email protected]>
Co-authored-by: Jacob Gadikian <[email protected]>
Co-authored-by: Sishir Giri <[email protected]>
Co-authored-by: marbar3778 <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: rene <[email protected]>
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
MissingNO57 pushed a commit to fetchai/cosmos-sdk that referenced this pull request Sep 16, 2022
… balance for a given denom (backport #12674) (#12745)

* feat: Add convenience method for constructing key to access account's balance for a given denom (#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

# Conflicts:
#	CHANGELOG.md
#	x/bank/legacy/v043/store.go
#	x/bank/types/keys.go

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>
MissingNO57 added a commit to fetchai/cosmos-sdk that referenced this pull request Sep 27, 2022
* fix: update x/mint parameter validation (backport #12384) (#12396)

* chore: optimize get last completed upgrade (#12268)

* feat: improve GetLastCompletedUpgrade

* rename

* use var block

* fix: Simulation is not deterministic due to GenTx (backport #12374) (#12437)

* fix: use go install instead of go get in makefile (#12435)

* chore: fumpt sdk v45 series #12442

* feat: Move AppModule.BeginBlock and AppModule.EndBlock to extension interfaces (backport #12603) (#12638)

* feat: Move AppModule.BeginBlock and AppModule.EndBlock to extension interfaces (#12603)

## Description
Most modules right now have a no-op for AppModule.BeginBlock and AppModule.EndBlock. We should move these methods off the AppModule interface so we have less deadcode, and instead move them to extension interfaces.

1. I added `BeginBlockAppModule` and `EndBlockAppModule` interface.
2. Remove the dead-code from modules that do no implement them
3. Add type casting in the the module code to use the new interface

Closes: #12462

* feat: add message index event attribute to authz message execution (backport #12668) (#12673)

* chore(store): upgrade iavl to v0.19.0 (backport #12626) (#12697)

* feat: Add `GetParamSetIfExists` to prevent panic on breaking param changes (#12724)

* feat: Add convenience method for constructing key to access account's balance for a given denom (backport #12674) (#12745)

* feat: Add convenience method for constructing key to access account's balance for a given denom (#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

# Conflicts:
#	CHANGELOG.md
#	x/bank/legacy/v043/store.go
#	x/bank/types/keys.go

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>

* chore: bump tm in 0.45.x (#12784)

* bump tendermint version

* add changelog entry

* replace on jhump

* updates

* updates

* updates

Co-authored-by: Aleksandr Bezobchuk <[email protected]>

* chore: 0.45.7 changelog prep (#12821)

* prepare for release

* modify release notes

* docs(staking): typo in staking/state (backport #12834) (#12836)

* fix(docs): typo in staking/state (#12834)

(cherry picked from commit fe89212)

# Conflicts:
#	x/staking/spec/01_state.md

* updates

Co-authored-by: Ari Rubinstein <[email protected]>
Co-authored-by: Julien Robert <[email protected]>

* chore: fee payer event (backport #12850) (#12856)

* chore: changelog update (backport #12859) (#12862)

* fix: Use fixed length hex for pointer at FwdCapabilityKey (backport #11737) (#12818)

* fix: Use fixed length hex for pointer at FwdCapabilityKey (backport #11737)

* Update CHANGELOG.md

* add comments and unit tests

* feat: deterministic map iteration (backport #12781) (#12944)

* feat: deterministic map iteration (#12781)

## Description

We should ensure that events emitted are in a deterministic order on any node.

Sorry, the previous [PR-12693](cosmos/cosmos-sdk#12693) was closed due to wrong operation.

Close: #12693

* chore: bump tendermint to `0.34.21` and iavl to `0.19.1` (#12970)

* perf: Amortize clearing unsorted cache entries (Juno genesis fix) (backport #12885) (#12961)

* perf: Amortize clearing unsorted cache entries (Juno genesis fix) (#12885)

This change fixes a bounty by the Juno team.  Juno's invariant checks took 10 hours during their most recent chain halt. This PR cuts that down to 30 seconds.  See https://github.com/CosmosContracts/bounties#improve-speed-of-invariant-checks.

The root problem is deep in the `can-withdraw` invariant check, which calls this repeatedly: https://github.com/cosmos/cosmos-sdk/blob/main/x/distribution/keeper/store.go#L337.  Iterators have a chain of parents and in this case creates an iterator from the `cachekv` store.  For the genesis file, it has a cache of 500,000+ unsorted entries, which are sorted as strings here: https://github.com/cosmos/cosmos-sdk/blob/main/store/cachekv/store.go#L314.  Each delegation from `can-withdraw` uses this cache and many of the cache checks miss or are a very small range.  This means very few entries get removed from the unsorted cache and they have to be re-sorted on the next call.  With a full cache it takes about 180ms on my machine to sort them.

This change introduce a minimum number of entries that will get processed and removed from the unsorted list. It's set at the same value that directs the code to sort them in the first place.  This ensures the unsorted values get removed in a relative short amount of time, and amortizes the cost to ensure an individual check does not have to process the entire cache.

## Benchmarks
On running the benchmarks included in this change produces:
```shell
name                    old time/op    new time/op    delta
LargeUnsortedMisses-32     21.2s ± 9%      0.0s ± 1%   -99.91%  (p=0.000 n=20+17)

name                    old alloc/op   new alloc/op   delta
LargeUnsortedMisses-32    1.64GB ± 0%    0.00GB ± 0%   -99.83%  (p=0.000 n=19+19)

name                    old allocs/op  new allocs/op  delta
LargeUnsortedMisses-32     20.0k ± 0%     41.1k ± 0%  +105.23%  (p=0.000 n=19+20)
```

## Invariant checks results
This is what the invariant checks for Juno look like with this change (on a Hetzner AX101):

```shell
INF starting node with ABCI Tendermint in-process
4:11PM INF Starting multiAppConn service impl=multiAppConn module=proxy
4:11PM INF Starting localClient service connection=query impl=localClient module=abci-client
4:11PM INF Starting localClient service connection=snapshot impl=localClient module=abci-client
4:11PM INF Starting localClient service connection=mempool impl=localClient module=abci-client
4:11PM INF Starting localClient service connection=consensus impl=localClient module=abci-client
4:11PM INF Starting EventBus service impl=EventBus module=events
4:11PM INF Starting PubSub service impl=PubSub module=pubsub
4:11PM INF Starting IndexerService service impl=IndexerService module=txindex
4:11PM INF ABCI Handshake App Info hash= height=0 module=consensus protocol-version=0 software-version=v9.0.0-36-g8fd6f16
4:11PM INF ABCI Replay Blocks appHeight=0 module=consensus stateHeight=0 storeHeight=0
4:12PM INF asserting crisis invariants inv=1/11 module=x/crisis name=gov/module-account
4:12PM INF asserting crisis invariants inv=2/11 module=x/crisis name=distribution/nonnegative-outstanding
4:12PM INF asserting crisis invariants inv=3/11 module=x/crisis name=distribution/can-withdraw
4:12PM INF asserting crisis invariants inv=4/11 module=x/crisis name=distribution/reference-count
4:12PM INF asserting crisis invariants inv=5/11 module=x/crisis name=distribution/module-account
4:12PM INF asserting crisis invariants inv=6/11 module=x/crisis name=bank/nonnegative-outstanding
4:12PM INF asserting crisis invariants inv=7/11 module=x/crisis name=bank/total-supply
4:12PM INF asserting crisis invariants inv=8/11 module=x/crisis name=staking/module-accounts
4:12PM INF asserting crisis invariants inv=9/11 module=x/crisis name=staking/nonnegative-power
4:12PM INF asserting crisis invariants inv=10/11 module=x/crisis name=staking/positive-delegation
4:12PM INF asserting crisis invariants inv=11/11 module=x/crisis name=staking/delegator-shares
4:12PM INF asserted all invariants duration=28383.559601 height=4136532 module=x/crisis
```

## Alternatives
There is another PR which fixes this problem for the Juno genesis file cosmos/cosmos-sdk#12886. However, because of its concurrent nature, it happens to hit a large range relatively early, clearing the unsorted entries and allowing the rest of the checks to not sort it.

(cherry picked from commit 4fc1f73)

# Conflicts:
#	CHANGELOG.md

* fix conflict

Co-authored-by: blazeroni <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
Co-authored-by: Marko <[email protected]>

* fix: proper error when parsing telemetry configuration (backport #12981) (#12999)

* ci: fix release notes not populated by goreleaser (#13019)

Co-authored-by: Julien Robert <[email protected]>

* fix: missing return statement in BaseApp.Query (backport #13046) (#13050)

* fix: missing return statement in BaseApp.Query (#13046)

## Description

Closes: #13040

* chore: v0.45.8 release changelog (#13053)

* chore: v0.45.8 release changelog

* fix issue name

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Robert Zaremba <[email protected]>
Co-authored-by: Adu <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
Co-authored-by: Jacob Gadikian <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
Co-authored-by: Ari Rubinstein <[email protected]>
Co-authored-by: yihuang <[email protected]>
Co-authored-by: blazeroni <[email protected]>
SpicyLemon added a commit to provenance-io/cosmos-sdk that referenced this pull request Oct 3, 2022
Squashed commit of the following:

commit 26786a0
Author: Julien Robert <[email protected]>
Date:   Mon Oct 3 18:13:53 2022 +0200

    chore: prepare `v0.46.2` release (cosmos#13436)

commit 72a904d
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 30 18:16:51 2022 -0400

    fix: add close for grpcOnly mode (backport cosmos#13418) (cosmos#13422)

commit f80e883
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Sep 29 08:10:41 2022 -0500

    fix: add gRPC nil/zero check in query (backport cosmos#13352) (cosmos#13417)

    * fix: add gRPC nil/zero check in query (cosmos#13352)

    (cherry picked from commit a9f02d9)

    # Conflicts:
    #	CHANGELOG.md
    #	codec/proto_codec_test.go

    * fix conflicts

    * fix conflicts

    Co-authored-by: yihuang <[email protected]>

commit 51c8a1a
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Sep 27 07:48:21 2022 -0500

    feat: Add notice for possible iavl fast node migration (backport cosmos#13390) (cosmos#13398)

    * add notice for possible iavl fast node migration (cosmos#13390)

    (cherry picked from commit b609105)

    * Update baseapp/baseapp.go

    Co-authored-by: adu-crypto <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit 95948f6
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 23 14:26:27 2022 -0500

    perf: reduce user's password prompts when calling keyring List function (backport cosmos#13207) (cosmos#13368)

    * perf: reduce user's password prompts when calling keyring List function (cosmos#13207)

    * Reduce user password prompts by taking advantage of the already existing MigrateAll function

    * Print message when no records were found on the keyring

    * Update changelog

    * Fix migration test

    * Add keys sort

    (cherry picked from commit 4882f93)

    # Conflicts:
    #	CHANGELOG.md

    * fix conflicts

    * suggestions

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>

    Co-authored-by: Ezequiel Raynaudo <[email protected]>
    Co-authored-by: Federico Kunze Küllmer <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>
    Co-authored-by: Aleksandr Bezobchuk <[email protected]>

commit c351441
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 23 08:26:34 2022 -0500

    docs: guidelines for proto message's String() method (cosmos#13364) (cosmos#13366)

    (cherry picked from commit 8dd708d)

    Co-authored-by: likhita-809 <[email protected]>

commit 72f8923
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 23 08:16:20 2022 -0500

    feat: add `draft-proposal` for x/group (backport cosmos#13353) (cosmos#13359)

    * feat: add `draft-proposal` for x/group (cosmos#13353)

    * feat: add `draft-proposal` for x/group

    * add changelog

    * extract useful function

    * add `GetMsgFromTypeURL` tests

    (cherry picked from commit 7eb259f)

    # Conflicts:
    #	CHANGELOG.md
    #	types/tx_msg.go
    #	x/gov/client/cli/prompt.go

    * fix conflicts

    * fix whitespace

    * backport cosmos#13350

    * renaming as main

    * updates

    Co-authored-by: Julien Robert <[email protected]>

commit 9454b97
Author: Julien Robert <[email protected]>
Date:   Tue Sep 20 18:02:24 2022 +0200

    fix: fix buf commit (cosmos#13344)

commit bbcf2f1
Author: Julien Robert <[email protected]>
Date:   Tue Sep 20 17:04:54 2022 +0200

    fix: fix buf unexisting repo (cosmos#13343)

commit f57a110
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Sep 20 16:30:54 2022 +0200

    fix: ensure withdraw_rewards events are always emitted on reward withdrawal (backport cosmos#13323) (cosmos#13339)

    * fix: ensure withdraw_rewards events are always emitted on reward withdrawal (cosmos#13323)

    (cherry picked from commit c1c23a7)

    # Conflicts:
    #	CHANGELOG.md
    #	tests/integration/distribution/keeper/delegation_test.go
    #	testutil/sims/app_helpers.go
    #	x/distribution/keeper/delegation.go
    #	x/distribution/keeper/delegation_test.go
    #	x/distribution/keeper/keeper.go

    * fix changelog

    * fix conflcits

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit 43f74d3
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Sep 20 16:29:50 2022 +0200

    feat: configurable fastnode (backport cosmos#13321) (cosmos#13337)

    * feat: configurable fastnode (cosmos#13321)

    (cherry picked from commit 412e2fc)

    # Conflicts:
    #	CHANGELOG.md
    #	fuzz/tests/store_internal_proofs_createnonmembershipproof_test.go
    #	go.mod
    #	go.sum
    #	simapp/go.mod
    #	simapp/go.sum
    #	tests/go.mod
    #	tests/go.sum

    * fix conflicts

    * test fix build

    * test fix build

    * fix typo

    * fix replace

    Co-authored-by: Marko <[email protected]>

commit 6c8614c
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Sep 20 10:40:42 2022 +0200

    fix: streaming listeners are not called for deliver tx event (backport cosmos#13334) (cosmos#13336)

    * fix: streaming listeners are not called for deliver tx event (cosmos#13334)

    * Problem: streaming listeners are not called for deliver tx event

    it was removed accidentally, add back.

    * Update CHANGELOG.md

    * try to fix e2e test by wait for one more block

    (cherry picked from commit 822900b)

    # Conflicts:
    #	CHANGELOG.md
    #	x/auth/tx/service_test.go

    * Update CHANGELOG.md

    * Update x/auth/tx/service_test.go

    * Update x/auth/tx/service_test.go

    Co-authored-by: yihuang <[email protected]>

commit 100db2e
Author: Julien Robert <[email protected]>
Date:   Mon Sep 19 16:00:44 2022 +0200

    fix: remove community-pool-spend from draft-cli prompt (cosmos#13330)

commit ef0f19c
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Mon Sep 19 13:35:08 2022 +0000

    feat: CLI tooling to generate proposal JSONs (backport cosmos#13304) (cosmos#13328)

    * feat: CLI tooling to generate proposal JSONs (cosmos#13304)

    (cherry picked from commit 7252f4a)

    # Conflicts:
    #	CHANGELOG.md
    #	api/cosmos/nft/v1beta1/tx.pulsar.go
    #	go.mod
    #	go.sum
    #	simapp/go.mod
    #	simapp/go.sum
    #	tests/go.mod
    #	tests/go.sum
    #	x/gov/README.md
    #	x/group/spec/05_client.md

    * fix changelog

    * remove unnecessary addition

    * updates

    * fix docs

    * updates

    Co-authored-by: Julien Robert <[email protected]>

commit c524571
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 16 16:03:13 2022 +0200

    fix: keep the balance query endpoint compatible with legacy blocks (backport cosmos#13301) (cosmos#13318)

    * fix: keep the balance query endpoint compatible with legacy blocks (cosmos#13301)

    * keep the balance query endpoint compatible with legacy blocks

    Closes: cosmos#13296

    A temporary solution before the proxy tool developed, since the balance endpoint is too important.

    * Update CHANGELOG.md

    * Apply suggestions from code review

    Co-authored-by: Julien Robert <[email protected]>
    Co-authored-by: Marko <[email protected]>
    (cherry picked from commit 6c4f94b)

    # Conflicts:
    #	CHANGELOG.md
    #	x/bank/keeper/view.go

    * Apply suggestions from code review

    * fix lint

    Co-authored-by: yihuang <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit 51a9014
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Sep 15 16:43:38 2022 +0200

    fix: types: correctly coalesce coins even with repeated denominations & simplify logic (backport cosmos#13265) (cosmos#13302)

    * fix: types: correctly coalesce coins even with repeated denominations & simplify logic (cosmos#13265)

    (cherry picked from commit 83f88a6)

    # Conflicts:
    #	types/coin_test.go

    * fix conflict

    * add changelog

    Co-authored-by: Emmanuel T Odeke <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit ac4a066
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Sep 14 10:56:13 2022 +0200

    feat: add more coins after add-genesis-account is made (backport cosmos#13233) (cosmos#13261)

    * feat: add more coins after add-genesis-account is made (cosmos#13233)

    (cherry picked from commit c32493a)

    # Conflicts:
    #	CHANGELOG.md

    * updates

    Co-authored-by: Reece Williams <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit 78336ef
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Sep 14 09:08:25 2022 +0200

    fix: sequence in `sign-batch` (backport cosmos#13200) (cosmos#13263)

commit 77fcbbd
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Sep 14 08:50:45 2022 +0200

    docs: adds gov groups metadata spec (cosmos#13118) (cosmos#13264)

commit 70943c6
Author: Julien Robert <[email protected]>
Date:   Mon Sep 12 15:07:18 2022 +0200

    chore: pin version of golangci-lint (cosmos#13245)

commit 25e7f9b
Author: Jacob Gadikian <[email protected]>
Date:   Mon Sep 12 15:35:06 2022 +0700

    fix: make 46's linter work (cosmos#13186)

commit 8121f34
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 9 10:28:02 2022 +0200

    fix: Add withdraw proposal cmd to group's CLI tx cmds (backport cosmos#13214) (cosmos#13216)

commit 095c2b0
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 2 16:01:21 2022 +0200

    chore: replace deprecated dgrijalva/jwt-go dep (backport cosmos#13093) (cosmos#13136)

    * chore: replace deprecated dgrijalva/jwt-go dep (cosmos#13093)

    * chore: replace deprecated dgrijalva/jwt-go dep

    * Update go.mod

    (cherry picked from commit f5f84ad)

    # Conflicts:
    #	go.mod
    #	go.sum

    * fix conflict

    Co-authored-by: Robert Zaremba <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit 9405a05
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 2 07:32:08 2022 +0200

    feat: Add a cli cmd to prune old states according to current settings (backport cosmos#12742) (cosmos#13119)

    * feat: Add a cli cmd to prune old states according to current settings (cosmos#12742)

    * add PruningCmd and change PruneStores signature

    * the mimimum default pruning interval is 10

    Co-authored-by: Marko <[email protected]>
    (cherry picked from commit d874ace)

    * fix backport error

    Co-authored-by: adu-crypto <[email protected]>
    Co-authored-by: adu <[email protected]>

commit a95c626
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Aug 31 14:21:02 2022 +0200

    fix: rollback command don't actually delete multistore versions (backport cosmos#11361) (cosmos#13089)

    * fix: rollback command don't actually delete multistore versions (cosmos#11361)

    * rollback command don't actually delete multistore versions

    Closes: cosmos#11333

    - add unit tests
    - use LoadVersionForOverwriting
    - update tendermint dependency to 0.35.x release branch

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>

    flushMetadata after rollback

    Update server/rollback.go

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>

    fix build

    gofumpt

    * fix unit test

    (cherry picked from commit 51d2de5)

    * fix unit test

    * changelog

    * api breaking changelog

    Co-authored-by: yihuang <[email protected]>

commit 78c24eb
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Aug 31 14:04:56 2022 +0200

    fix: call `SetIAVLCacheSize` with the configured value in simapp (backport cosmos#13107) (cosmos#13108)

    * fix: call `SetIAVLCacheSize` with the configured value in simapp (cosmos#13107)

    * Call `SetIAVLCacheSize` with the configured value in simapp.

    * Update CHANGELOG.md

    (cherry picked from commit ab33342)

    # Conflicts:
    #	CHANGELOG.md

    * Apply suggestions from code review

    Co-authored-by: yihuang <[email protected]>

commit bb190f6
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Mon Aug 29 11:36:24 2022 +0000

    chore: bump gin-gonic dep (backport cosmos#13061) (cosmos#13062)

    * deps: bump gin-gonic (cosmos#13061)

    Co-authored-by: Julien Robert <[email protected]>
    (cherry picked from commit d11196a)

    # Conflicts:
    #	go.sum

    * fix conflicts

    Co-authored-by: Robert Zaremba <[email protected]>
    Co-authored-by: marbar3778 <[email protected]>

commit 1af5c72
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Sat Aug 27 09:18:50 2022 +0200

    feat(x/auth): Add auth sim decoder case for AccountNumberStoreKeyPrefix (backport cosmos#13048) (cosmos#13054)

commit e2fe96a
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Aug 26 13:16:02 2022 -0400

    feat(x/authz): Add the GetAuthorization function. (backport cosmos#13047) (cosmos#13052)

    * feat(x/authz): Add the GetAuthorization function. (cosmos#13047)

    * [13027]: Create the GetAuthorization function (in the authz module).

    * [13027]: Add unit tests for the new GetAuthorization function.

    * [13027]: Add changelog entry.

    (cherry picked from commit 5e4651e)

    # Conflicts:
    #	CHANGELOG.md
    #	x/authz/keeper/keeper_test.go

    * fix changelog

    * Fix failed merge.

    * Fix build issue introduced by merge.

    Co-authored-by: Daniel Wedul <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit b9d4ed8
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Aug 25 15:15:13 2022 -0400

    fix: missing return statement in BaseApp.Query (backport cosmos#13046) (cosmos#13049)

    * fix: missing return statement in BaseApp.Query (cosmos#13046)

    ## Description

    Closes: cosmos#13040

    ---

    ### Author Checklist

    *All items are required. Please add a note to the item if the item is not applicable and
    please add links to any relevant follow up issues.*

    I have...

    - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
    - [ ] added `!` to the type prefix if API or client breaking change
    - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
    - [ ] provided a link to the relevant issue or specification
    - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
    - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
    - [ ] added a changelog entry to `CHANGELOG.md`
    - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
    - [ ] updated the relevant documentation or specification
    - [ ] reviewed "Files changed" and left comments if necessary
    - [ ] confirmed all CI checks have passed

    ### Reviewers Checklist

    *All items are required. Please add a note if the item is not applicable and please add
    your handle next to the items reviewed if you only reviewed selected items.*

    I have...

    - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
    - [ ] confirmed `!` in the type prefix if API or client breaking change
    - [ ] confirmed all author checklist items have been addressed
    - [ ] reviewed state machine logic
    - [ ] reviewed API design and naming
    - [ ] reviewed documentation is accurate
    - [ ] reviewed tests and test coverage
    - [ ] manually tested (if applicable)

    (cherry picked from commit c73171f)

    # Conflicts:
    #	CHANGELOG.md

    * fix conflicts

    Co-authored-by: Julien Robert <[email protected]>

commit 704fff5
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Aug 25 14:30:04 2022 +0200

    fix: exporting the blockParams regression (backport cosmos#13029) (cosmos#13037)

    * fix: exporting the blockParams regression (cosmos#13029)

    ## Description

    Closes: cosmos#13024

    ---

    ### Author Checklist

    *All items are required. Please add a note to the item if the item is not applicable and
    please add links to any relevant follow up issues.*

    I have...

    - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
    - [x] added `!` to the type prefix if API or client breaking change
    - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
    - [x] provided a link to the relevant issue or specification
    - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
    - [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
    - [x] added a changelog entry to `CHANGELOG.md`
    - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
    - [ ] updated the relevant documentation or specification
    - [x] reviewed "Files changed" and left comments if necessary
    - [ ] confirmed all CI checks have passed

    ### Reviewers Checklist

    *All items are required. Please add a note if the item is not applicable and please add
    your handle next to the items reviewed if you only reviewed selected items.*

    I have...

    - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
    - [ ] confirmed `!` in the type prefix if API or client breaking change
    - [ ] confirmed all author checklist items have been addressed
    - [ ] reviewed state machine logic
    - [ ] reviewed API design and naming
    - [ ] reviewed documentation is accurate
    - [ ] reviewed tests and test coverage
    - [ ] manually tested (if applicable)

    (cherry picked from commit e1999e4)

    # Conflicts:
    #	CHANGELOG.md
    #	server/export_test.go

    * fix conflicts

    Co-authored-by: JayT106 <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit cb7bdca
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Aug 24 15:15:28 2022 -0400

    ci: fix release notes not populated by goreleaser (backport cosmos#12919) (cosmos#13018)

    * ci: fix release notes not populated by goreleaser

    (cherry picked from commit c670fec)

    # Conflicts:
    #	cosmovisor/go.mod
    #	cosmovisor/go.sum
    #	go.work.sum

    * updates

    * revert

    Co-authored-by: Julien Robert <[email protected]>

commit 252c673
Author: Julien Robert <[email protected]>
Date:   Wed Aug 24 17:43:33 2022 +0200

    chore: v0.46.1 release changelog (cosmos#13011)

    * chore: v0.46.1 release changelog

    * updates

    * updates

commit 60e6274
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Aug 24 16:45:44 2022 +0200

    feat: Change the default priority mechanism to be based on gas price (backport cosmos#12953) (cosmos#13006)

    * feat: Change the default priority mechanism to be based on gas price (cosmos#12953)

    (cherry picked from commit befd816)

    # Conflicts:
    #	CHANGELOG.md
    #	x/auth/ante/fee_test.go

    * fix conflict

    Co-authored-by: yihuang <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit afb3def
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Aug 23 14:54:38 2022 -0400

    docs: improve UPGRADING.md instructions for v0.46.0 (backport cosmos#12646) (cosmos#13004)

    * docs: improve UPGRADING.md instructions for v0.46.0 (cosmos#12646)

    ## Description

    This PR is aimed to improve further the UGPRADING.md for v0.46.0.
    We've merged cosmos#12477 for having concurrent work on the file.

    - ref cosmos#12992 and closes cosmos#12991
    - closes cosmos#12963

    ---

    ### Author Checklist

    *All items are required. Please add a note to the item if the item is not applicable and
    please add links to any relevant follow up issues.*

    I have...

    - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
    - [ ] added `!` to the type prefix if API or client breaking change
    - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
    - [ ] provided a link to the relevant issue or specification
    - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
    - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
    - [ ] added a changelog entry to `CHANGELOG.md`
    - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
    - [ ] updated the relevant documentation or specification
    - [ ] reviewed "Files changed" and left comments if necessary
    - [ ] confirmed all CI checks have passed

    ### Reviewers Checklist

    *All items are required. Please add a note if the item is not applicable and please add
    your handle next to the items reviewed if you only reviewed selected items.*

    I have...

    - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
    - [ ] confirmed `!` in the type prefix if API or client breaking change
    - [ ] confirmed all author checklist items have been addressed
    - [ ] reviewed state machine logic
    - [ ] reviewed API design and naming
    - [ ] reviewed documentation is accurate
    - [ ] reviewed tests and test coverage
    - [ ] manually tested (if applicable)

    (cherry picked from commit c76a00b)

    # Conflicts:
    #	.gitignore
    #	CHANGELOG.md
    #	Makefile
    #	UPGRADING.md

    * fix conflict

    Co-authored-by: Julien Robert <[email protected]>

commit 90ef369
Author: Sai Kumar <[email protected]>
Date:   Tue Aug 23 20:01:13 2022 +0530

    fix: fix the gov proposals (cosmos#13002)

commit d3d4675
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Aug 23 14:11:23 2022 +0200

    fix: proper error when parsing telemetry configuration (backport cosmos#12981) (cosmos#12998)

    * fix: proper error when parsing telemetry configuration (cosmos#12981)

    When parsing `telemetry.global-labels` config the code assumes that the type will be an array.  I saw an issue where someone edited the configuration in the wrong way and got the following error:
    ![photo_2022-08-21_08-02-21](https://user-images.githubusercontent.com/22855163/185793842-c5759a54-1860-4dd1-bdb4-b94f4dab3c16.jpg)
    Instead, I suggest here to print a proper error log to indicate what the issue is.

    (cherry picked from commit c24c439)

    * add changelog

    Co-authored-by: liorbond <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit c835d46
Author: Jacob Gadikian <[email protected]>
Date:   Mon Aug 22 04:30:00 2022 +0700

    Update Makefile (cosmos#12982)

    formatting

commit 7ee9e6d
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Aug 19 18:26:49 2022 +0200

    docs(cli): improve --gas flag description (cosmos#12913) (cosmos#12965)

    * docs(cli): improve --gas flag description

    * Update client/flags/flags.go

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>

    * fix sprintf

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>
    (cherry picked from commit f430528)

    Co-authored-by: Robert Zaremba <[email protected]>

commit f31c795
Author: Julien Robert <[email protected]>
Date:   Fri Aug 19 18:26:07 2022 +0200

    chore: bump tendermint to `0.34.21` and iavl to `0.19.1` (cosmos#12969)

    * chore: bump tendermint to `0.34.21` and iavl to `0.19.1`

    * update changelog

commit 32c9075
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Aug 18 15:34:32 2022 -0400

    fix: the occasional  staking module `SimulateMsgCancelUnbondingDelegate` failure (backport cosmos#12933) (cosmos#12962)

commit d2a5018
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Aug 18 15:34:09 2022 -0400

    feat: deterministic map iteration (backport cosmos#12781) (cosmos#12943)

commit f3c1d8c
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Aug 18 15:33:52 2022 -0400

    perf: Amortize clearing unsorted cache entries (Juno genesis fix) (backport cosmos#12885) (cosmos#12960)

commit 629b3b9
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Aug 11 10:32:48 2022 -0400

    fix: move downgrade verification after store migration (cosmos#12906) (cosmos#12907)

commit d74d102
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Aug 10 16:16:53 2022 +0200

    fix(x/group): propagate events correctly to current context (backport cosmos#12888) (cosmos#12890)

    * fix(x/group): propagate events correctly to current context (cosmos#12888)

    * fix(x/groups) propagate events correctly to current context

    * update to use current context on logger

    * adding changelog entry

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>
    (cherry picked from commit 014bfae)

    # Conflicts:
    #	CHANGELOG.md

    * fix conflicts

    Co-authored-by: Damian Nolan <[email protected]>
    Co-authored-by: Amaury M <[email protected]>

commit 5caee00
Author: Robert Zaremba <[email protected]>
Date:   Wed Aug 10 10:02:13 2022 +0200

    chore: bump math (cosmos#12877)

    * chore: bump math package

    * changelog

commit 69c88ad
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Mon Aug 8 17:22:58 2022 -0400

    chore: changelog update (backport cosmos#12859) (cosmos#12861)

commit e5b974c
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Mon Aug 8 15:13:12 2022 -0400

    chore: fee payer event (cosmos#12850) (cosmos#12855)

commit 137bd03
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Sun Aug 7 22:39:42 2022 +0200

    Update REST endpoints for group module documentation (cosmos#12839) (cosmos#12840)

    (cherry picked from commit cfed17e)

    Co-authored-by: lg <[email protected]>

commit 2b616fb
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Sun Aug 7 09:43:59 2022 -0400

    fix(docs): typo in staking/state (cosmos#12834) (cosmos#12835)

    (cherry picked from commit fe89212)

    Co-authored-by: Ari Rubinstein <[email protected]>

commit 1890b8b
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Aug 2 10:26:49 2022 +0200

    feat: Add GetParamSetIfExists to prevent panic on breaking param changes (backport cosmos#12615) (cosmos#12792)

    * feat: Add GetParamSetIfExists to prevent panic on breaking param changes (cosmos#12615)

    * imp(params): Add GetParamSetIfExists to prevent panic on breaking param changes

    * changelog

    * test

    Co-authored-by: Marko <[email protected]>
    (cherry picked from commit 2932e11)

    # Conflicts:
    #	CHANGELOG.md

    * Update CHANGELOG.md

    Co-authored-by: Federico Kunze Küllmer <[email protected]>
    Co-authored-by: Marko <[email protected]>

commit 04e7ab1
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Jul 27 16:46:05 2022 +0200

    feat: Add convenience method for constructing key to access account's balance for a given denom (backport cosmos#12674) (cosmos#12744)

    * feat: Add convenience method for constructing key to access account's balance for a given denom (cosmos#12674)

    This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

    I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

    It would be nice to have a definitive convenience method for constructing the key.

    [Ref.](github.com/celestiaorg/celestia-node/pull/911)

    (cherry picked from commit a1777a8)

    * updates changelog

    Co-authored-by: rene <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>
SpicyLemon added a commit to provenance-io/cosmos-sdk that referenced this pull request Oct 3, 2022
* Merged v0.46.2 into release-pio/v0.46.x.

Squashed commit of the following:

commit 26786a0
Author: Julien Robert <[email protected]>
Date:   Mon Oct 3 18:13:53 2022 +0200

    chore: prepare `v0.46.2` release (cosmos#13436)

commit 72a904d
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 30 18:16:51 2022 -0400

    fix: add close for grpcOnly mode (backport cosmos#13418) (cosmos#13422)

commit f80e883
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Sep 29 08:10:41 2022 -0500

    fix: add gRPC nil/zero check in query (backport cosmos#13352) (cosmos#13417)

    * fix: add gRPC nil/zero check in query (cosmos#13352)

    (cherry picked from commit a9f02d9)

    # Conflicts:
    #	CHANGELOG.md
    #	codec/proto_codec_test.go

    * fix conflicts

    * fix conflicts

    Co-authored-by: yihuang <[email protected]>

commit 51c8a1a
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Sep 27 07:48:21 2022 -0500

    feat: Add notice for possible iavl fast node migration (backport cosmos#13390) (cosmos#13398)

    * add notice for possible iavl fast node migration (cosmos#13390)

    (cherry picked from commit b609105)

    * Update baseapp/baseapp.go

    Co-authored-by: adu-crypto <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit 95948f6
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 23 14:26:27 2022 -0500

    perf: reduce user's password prompts when calling keyring List function (backport cosmos#13207) (cosmos#13368)

    * perf: reduce user's password prompts when calling keyring List function (cosmos#13207)

    * Reduce user password prompts by taking advantage of the already existing MigrateAll function

    * Print message when no records were found on the keyring

    * Update changelog

    * Fix migration test

    * Add keys sort

    (cherry picked from commit 4882f93)

    # Conflicts:
    #	CHANGELOG.md

    * fix conflicts

    * suggestions

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>

    Co-authored-by: Ezequiel Raynaudo <[email protected]>
    Co-authored-by: Federico Kunze Küllmer <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>
    Co-authored-by: Aleksandr Bezobchuk <[email protected]>

commit c351441
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 23 08:26:34 2022 -0500

    docs: guidelines for proto message's String() method (cosmos#13364) (cosmos#13366)

    (cherry picked from commit 8dd708d)

    Co-authored-by: likhita-809 <[email protected]>

commit 72f8923
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 23 08:16:20 2022 -0500

    feat: add `draft-proposal` for x/group (backport cosmos#13353) (cosmos#13359)

    * feat: add `draft-proposal` for x/group (cosmos#13353)

    * feat: add `draft-proposal` for x/group

    * add changelog

    * extract useful function

    * add `GetMsgFromTypeURL` tests

    (cherry picked from commit 7eb259f)

    # Conflicts:
    #	CHANGELOG.md
    #	types/tx_msg.go
    #	x/gov/client/cli/prompt.go

    * fix conflicts

    * fix whitespace

    * backport cosmos#13350

    * renaming as main

    * updates

    Co-authored-by: Julien Robert <[email protected]>

commit 9454b97
Author: Julien Robert <[email protected]>
Date:   Tue Sep 20 18:02:24 2022 +0200

    fix: fix buf commit (cosmos#13344)

commit bbcf2f1
Author: Julien Robert <[email protected]>
Date:   Tue Sep 20 17:04:54 2022 +0200

    fix: fix buf unexisting repo (cosmos#13343)

commit f57a110
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Sep 20 16:30:54 2022 +0200

    fix: ensure withdraw_rewards events are always emitted on reward withdrawal (backport cosmos#13323) (cosmos#13339)

    * fix: ensure withdraw_rewards events are always emitted on reward withdrawal (cosmos#13323)

    (cherry picked from commit c1c23a7)

    # Conflicts:
    #	CHANGELOG.md
    #	tests/integration/distribution/keeper/delegation_test.go
    #	testutil/sims/app_helpers.go
    #	x/distribution/keeper/delegation.go
    #	x/distribution/keeper/delegation_test.go
    #	x/distribution/keeper/keeper.go

    * fix changelog

    * fix conflcits

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit 43f74d3
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Sep 20 16:29:50 2022 +0200

    feat: configurable fastnode (backport cosmos#13321) (cosmos#13337)

    * feat: configurable fastnode (cosmos#13321)

    (cherry picked from commit 412e2fc)

    # Conflicts:
    #	CHANGELOG.md
    #	fuzz/tests/store_internal_proofs_createnonmembershipproof_test.go
    #	go.mod
    #	go.sum
    #	simapp/go.mod
    #	simapp/go.sum
    #	tests/go.mod
    #	tests/go.sum

    * fix conflicts

    * test fix build

    * test fix build

    * fix typo

    * fix replace

    Co-authored-by: Marko <[email protected]>

commit 6c8614c
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Sep 20 10:40:42 2022 +0200

    fix: streaming listeners are not called for deliver tx event (backport cosmos#13334) (cosmos#13336)

    * fix: streaming listeners are not called for deliver tx event (cosmos#13334)

    * Problem: streaming listeners are not called for deliver tx event

    it was removed accidentally, add back.

    * Update CHANGELOG.md

    * try to fix e2e test by wait for one more block

    (cherry picked from commit 822900b)

    # Conflicts:
    #	CHANGELOG.md
    #	x/auth/tx/service_test.go

    * Update CHANGELOG.md

    * Update x/auth/tx/service_test.go

    * Update x/auth/tx/service_test.go

    Co-authored-by: yihuang <[email protected]>

commit 100db2e
Author: Julien Robert <[email protected]>
Date:   Mon Sep 19 16:00:44 2022 +0200

    fix: remove community-pool-spend from draft-cli prompt (cosmos#13330)

commit ef0f19c
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Mon Sep 19 13:35:08 2022 +0000

    feat: CLI tooling to generate proposal JSONs (backport cosmos#13304) (cosmos#13328)

    * feat: CLI tooling to generate proposal JSONs (cosmos#13304)

    (cherry picked from commit 7252f4a)

    # Conflicts:
    #	CHANGELOG.md
    #	api/cosmos/nft/v1beta1/tx.pulsar.go
    #	go.mod
    #	go.sum
    #	simapp/go.mod
    #	simapp/go.sum
    #	tests/go.mod
    #	tests/go.sum
    #	x/gov/README.md
    #	x/group/spec/05_client.md

    * fix changelog

    * remove unnecessary addition

    * updates

    * fix docs

    * updates

    Co-authored-by: Julien Robert <[email protected]>

commit c524571
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 16 16:03:13 2022 +0200

    fix: keep the balance query endpoint compatible with legacy blocks (backport cosmos#13301) (cosmos#13318)

    * fix: keep the balance query endpoint compatible with legacy blocks (cosmos#13301)

    * keep the balance query endpoint compatible with legacy blocks

    Closes: cosmos#13296

    A temporary solution before the proxy tool developed, since the balance endpoint is too important.

    * Update CHANGELOG.md

    * Apply suggestions from code review

    Co-authored-by: Julien Robert <[email protected]>
    Co-authored-by: Marko <[email protected]>
    (cherry picked from commit 6c4f94b)

    # Conflicts:
    #	CHANGELOG.md
    #	x/bank/keeper/view.go

    * Apply suggestions from code review

    * fix lint

    Co-authored-by: yihuang <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit 51a9014
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Sep 15 16:43:38 2022 +0200

    fix: types: correctly coalesce coins even with repeated denominations & simplify logic (backport cosmos#13265) (cosmos#13302)

    * fix: types: correctly coalesce coins even with repeated denominations & simplify logic (cosmos#13265)

    (cherry picked from commit 83f88a6)

    # Conflicts:
    #	types/coin_test.go

    * fix conflict

    * add changelog

    Co-authored-by: Emmanuel T Odeke <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit ac4a066
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Sep 14 10:56:13 2022 +0200

    feat: add more coins after add-genesis-account is made (backport cosmos#13233) (cosmos#13261)

    * feat: add more coins after add-genesis-account is made (cosmos#13233)

    (cherry picked from commit c32493a)

    # Conflicts:
    #	CHANGELOG.md

    * updates

    Co-authored-by: Reece Williams <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit 78336ef
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Sep 14 09:08:25 2022 +0200

    fix: sequence in `sign-batch` (backport cosmos#13200) (cosmos#13263)

commit 77fcbbd
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Sep 14 08:50:45 2022 +0200

    docs: adds gov groups metadata spec (cosmos#13118) (cosmos#13264)

commit 70943c6
Author: Julien Robert <[email protected]>
Date:   Mon Sep 12 15:07:18 2022 +0200

    chore: pin version of golangci-lint (cosmos#13245)

commit 25e7f9b
Author: Jacob Gadikian <[email protected]>
Date:   Mon Sep 12 15:35:06 2022 +0700

    fix: make 46's linter work (cosmos#13186)

commit 8121f34
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 9 10:28:02 2022 +0200

    fix: Add withdraw proposal cmd to group's CLI tx cmds (backport cosmos#13214) (cosmos#13216)

commit 095c2b0
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 2 16:01:21 2022 +0200

    chore: replace deprecated dgrijalva/jwt-go dep (backport cosmos#13093) (cosmos#13136)

    * chore: replace deprecated dgrijalva/jwt-go dep (cosmos#13093)

    * chore: replace deprecated dgrijalva/jwt-go dep

    * Update go.mod

    (cherry picked from commit f5f84ad)

    # Conflicts:
    #	go.mod
    #	go.sum

    * fix conflict

    Co-authored-by: Robert Zaremba <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit 9405a05
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Sep 2 07:32:08 2022 +0200

    feat: Add a cli cmd to prune old states according to current settings (backport cosmos#12742) (cosmos#13119)

    * feat: Add a cli cmd to prune old states according to current settings (cosmos#12742)

    * add PruningCmd and change PruneStores signature

    * the mimimum default pruning interval is 10

    Co-authored-by: Marko <[email protected]>
    (cherry picked from commit d874ace)

    * fix backport error

    Co-authored-by: adu-crypto <[email protected]>
    Co-authored-by: adu <[email protected]>

commit a95c626
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Aug 31 14:21:02 2022 +0200

    fix: rollback command don't actually delete multistore versions (backport cosmos#11361) (cosmos#13089)

    * fix: rollback command don't actually delete multistore versions (cosmos#11361)

    * rollback command don't actually delete multistore versions

    Closes: cosmos#11333

    - add unit tests
    - use LoadVersionForOverwriting
    - update tendermint dependency to 0.35.x release branch

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>

    flushMetadata after rollback

    Update server/rollback.go

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>

    fix build

    gofumpt

    * fix unit test

    (cherry picked from commit 51d2de5)

    * fix unit test

    * changelog

    * api breaking changelog

    Co-authored-by: yihuang <[email protected]>

commit 78c24eb
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Aug 31 14:04:56 2022 +0200

    fix: call `SetIAVLCacheSize` with the configured value in simapp (backport cosmos#13107) (cosmos#13108)

    * fix: call `SetIAVLCacheSize` with the configured value in simapp (cosmos#13107)

    * Call `SetIAVLCacheSize` with the configured value in simapp.

    * Update CHANGELOG.md

    (cherry picked from commit ab33342)

    # Conflicts:
    #	CHANGELOG.md

    * Apply suggestions from code review

    Co-authored-by: yihuang <[email protected]>

commit bb190f6
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Mon Aug 29 11:36:24 2022 +0000

    chore: bump gin-gonic dep (backport cosmos#13061) (cosmos#13062)

    * deps: bump gin-gonic (cosmos#13061)

    Co-authored-by: Julien Robert <[email protected]>
    (cherry picked from commit d11196a)

    # Conflicts:
    #	go.sum

    * fix conflicts

    Co-authored-by: Robert Zaremba <[email protected]>
    Co-authored-by: marbar3778 <[email protected]>

commit 1af5c72
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Sat Aug 27 09:18:50 2022 +0200

    feat(x/auth): Add auth sim decoder case for AccountNumberStoreKeyPrefix (backport cosmos#13048) (cosmos#13054)

commit e2fe96a
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Aug 26 13:16:02 2022 -0400

    feat(x/authz): Add the GetAuthorization function. (backport cosmos#13047) (cosmos#13052)

    * feat(x/authz): Add the GetAuthorization function. (cosmos#13047)

    * [13027]: Create the GetAuthorization function (in the authz module).

    * [13027]: Add unit tests for the new GetAuthorization function.

    * [13027]: Add changelog entry.

    (cherry picked from commit 5e4651e)

    # Conflicts:
    #	CHANGELOG.md
    #	x/authz/keeper/keeper_test.go

    * fix changelog

    * Fix failed merge.

    * Fix build issue introduced by merge.

    Co-authored-by: Daniel Wedul <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit b9d4ed8
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Aug 25 15:15:13 2022 -0400

    fix: missing return statement in BaseApp.Query (backport cosmos#13046) (cosmos#13049)

    * fix: missing return statement in BaseApp.Query (cosmos#13046)

    ## Description

    Closes: cosmos#13040

    ---

    ### Author Checklist

    *All items are required. Please add a note to the item if the item is not applicable and
    please add links to any relevant follow up issues.*

    I have...

    - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
    - [ ] added `!` to the type prefix if API or client breaking change
    - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
    - [ ] provided a link to the relevant issue or specification
    - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
    - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
    - [ ] added a changelog entry to `CHANGELOG.md`
    - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
    - [ ] updated the relevant documentation or specification
    - [ ] reviewed "Files changed" and left comments if necessary
    - [ ] confirmed all CI checks have passed

    ### Reviewers Checklist

    *All items are required. Please add a note if the item is not applicable and please add
    your handle next to the items reviewed if you only reviewed selected items.*

    I have...

    - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
    - [ ] confirmed `!` in the type prefix if API or client breaking change
    - [ ] confirmed all author checklist items have been addressed
    - [ ] reviewed state machine logic
    - [ ] reviewed API design and naming
    - [ ] reviewed documentation is accurate
    - [ ] reviewed tests and test coverage
    - [ ] manually tested (if applicable)

    (cherry picked from commit c73171f)

    # Conflicts:
    #	CHANGELOG.md

    * fix conflicts

    Co-authored-by: Julien Robert <[email protected]>

commit 704fff5
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Aug 25 14:30:04 2022 +0200

    fix: exporting the blockParams regression (backport cosmos#13029) (cosmos#13037)

    * fix: exporting the blockParams regression (cosmos#13029)

    ## Description

    Closes: cosmos#13024

    ---

    ### Author Checklist

    *All items are required. Please add a note to the item if the item is not applicable and
    please add links to any relevant follow up issues.*

    I have...

    - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
    - [x] added `!` to the type prefix if API or client breaking change
    - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
    - [x] provided a link to the relevant issue or specification
    - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
    - [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
    - [x] added a changelog entry to `CHANGELOG.md`
    - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
    - [ ] updated the relevant documentation or specification
    - [x] reviewed "Files changed" and left comments if necessary
    - [ ] confirmed all CI checks have passed

    ### Reviewers Checklist

    *All items are required. Please add a note if the item is not applicable and please add
    your handle next to the items reviewed if you only reviewed selected items.*

    I have...

    - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
    - [ ] confirmed `!` in the type prefix if API or client breaking change
    - [ ] confirmed all author checklist items have been addressed
    - [ ] reviewed state machine logic
    - [ ] reviewed API design and naming
    - [ ] reviewed documentation is accurate
    - [ ] reviewed tests and test coverage
    - [ ] manually tested (if applicable)

    (cherry picked from commit e1999e4)

    # Conflicts:
    #	CHANGELOG.md
    #	server/export_test.go

    * fix conflicts

    Co-authored-by: JayT106 <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit cb7bdca
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Aug 24 15:15:28 2022 -0400

    ci: fix release notes not populated by goreleaser (backport cosmos#12919) (cosmos#13018)

    * ci: fix release notes not populated by goreleaser

    (cherry picked from commit c670fec)

    # Conflicts:
    #	cosmovisor/go.mod
    #	cosmovisor/go.sum
    #	go.work.sum

    * updates

    * revert

    Co-authored-by: Julien Robert <[email protected]>

commit 252c673
Author: Julien Robert <[email protected]>
Date:   Wed Aug 24 17:43:33 2022 +0200

    chore: v0.46.1 release changelog (cosmos#13011)

    * chore: v0.46.1 release changelog

    * updates

    * updates

commit 60e6274
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Aug 24 16:45:44 2022 +0200

    feat: Change the default priority mechanism to be based on gas price (backport cosmos#12953) (cosmos#13006)

    * feat: Change the default priority mechanism to be based on gas price (cosmos#12953)

    (cherry picked from commit befd816)

    # Conflicts:
    #	CHANGELOG.md
    #	x/auth/ante/fee_test.go

    * fix conflict

    Co-authored-by: yihuang <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit afb3def
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Aug 23 14:54:38 2022 -0400

    docs: improve UPGRADING.md instructions for v0.46.0 (backport cosmos#12646) (cosmos#13004)

    * docs: improve UPGRADING.md instructions for v0.46.0 (cosmos#12646)

    ## Description

    This PR is aimed to improve further the UGPRADING.md for v0.46.0.
    We've merged cosmos#12477 for having concurrent work on the file.

    - ref cosmos#12992 and closes cosmos#12991
    - closes cosmos#12963

    ---

    ### Author Checklist

    *All items are required. Please add a note to the item if the item is not applicable and
    please add links to any relevant follow up issues.*

    I have...

    - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
    - [ ] added `!` to the type prefix if API or client breaking change
    - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
    - [ ] provided a link to the relevant issue or specification
    - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
    - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
    - [ ] added a changelog entry to `CHANGELOG.md`
    - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
    - [ ] updated the relevant documentation or specification
    - [ ] reviewed "Files changed" and left comments if necessary
    - [ ] confirmed all CI checks have passed

    ### Reviewers Checklist

    *All items are required. Please add a note if the item is not applicable and please add
    your handle next to the items reviewed if you only reviewed selected items.*

    I have...

    - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
    - [ ] confirmed `!` in the type prefix if API or client breaking change
    - [ ] confirmed all author checklist items have been addressed
    - [ ] reviewed state machine logic
    - [ ] reviewed API design and naming
    - [ ] reviewed documentation is accurate
    - [ ] reviewed tests and test coverage
    - [ ] manually tested (if applicable)

    (cherry picked from commit c76a00b)

    # Conflicts:
    #	.gitignore
    #	CHANGELOG.md
    #	Makefile
    #	UPGRADING.md

    * fix conflict

    Co-authored-by: Julien Robert <[email protected]>

commit 90ef369
Author: Sai Kumar <[email protected]>
Date:   Tue Aug 23 20:01:13 2022 +0530

    fix: fix the gov proposals (cosmos#13002)

commit d3d4675
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Aug 23 14:11:23 2022 +0200

    fix: proper error when parsing telemetry configuration (backport cosmos#12981) (cosmos#12998)

    * fix: proper error when parsing telemetry configuration (cosmos#12981)

    When parsing `telemetry.global-labels` config the code assumes that the type will be an array.  I saw an issue where someone edited the configuration in the wrong way and got the following error:
    ![photo_2022-08-21_08-02-21](https://user-images.githubusercontent.com/22855163/185793842-c5759a54-1860-4dd1-bdb4-b94f4dab3c16.jpg)
    Instead, I suggest here to print a proper error log to indicate what the issue is.

    (cherry picked from commit c24c439)

    * add changelog

    Co-authored-by: liorbond <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

commit c835d46
Author: Jacob Gadikian <[email protected]>
Date:   Mon Aug 22 04:30:00 2022 +0700

    Update Makefile (cosmos#12982)

    formatting

commit 7ee9e6d
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Fri Aug 19 18:26:49 2022 +0200

    docs(cli): improve --gas flag description (cosmos#12913) (cosmos#12965)

    * docs(cli): improve --gas flag description

    * Update client/flags/flags.go

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>

    * fix sprintf

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>
    (cherry picked from commit f430528)

    Co-authored-by: Robert Zaremba <[email protected]>

commit f31c795
Author: Julien Robert <[email protected]>
Date:   Fri Aug 19 18:26:07 2022 +0200

    chore: bump tendermint to `0.34.21` and iavl to `0.19.1` (cosmos#12969)

    * chore: bump tendermint to `0.34.21` and iavl to `0.19.1`

    * update changelog

commit 32c9075
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Aug 18 15:34:32 2022 -0400

    fix: the occasional  staking module `SimulateMsgCancelUnbondingDelegate` failure (backport cosmos#12933) (cosmos#12962)

commit d2a5018
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Aug 18 15:34:09 2022 -0400

    feat: deterministic map iteration (backport cosmos#12781) (cosmos#12943)

commit f3c1d8c
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Aug 18 15:33:52 2022 -0400

    perf: Amortize clearing unsorted cache entries (Juno genesis fix) (backport cosmos#12885) (cosmos#12960)

commit 629b3b9
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Thu Aug 11 10:32:48 2022 -0400

    fix: move downgrade verification after store migration (cosmos#12906) (cosmos#12907)

commit d74d102
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Aug 10 16:16:53 2022 +0200

    fix(x/group): propagate events correctly to current context (backport cosmos#12888) (cosmos#12890)

    * fix(x/group): propagate events correctly to current context (cosmos#12888)

    * fix(x/groups) propagate events correctly to current context

    * update to use current context on logger

    * adding changelog entry

    Co-authored-by: Aleksandr Bezobchuk <[email protected]>
    (cherry picked from commit 014bfae)

    # Conflicts:
    #	CHANGELOG.md

    * fix conflicts

    Co-authored-by: Damian Nolan <[email protected]>
    Co-authored-by: Amaury M <[email protected]>

commit 5caee00
Author: Robert Zaremba <[email protected]>
Date:   Wed Aug 10 10:02:13 2022 +0200

    chore: bump math (cosmos#12877)

    * chore: bump math package

    * changelog

commit 69c88ad
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Mon Aug 8 17:22:58 2022 -0400

    chore: changelog update (backport cosmos#12859) (cosmos#12861)

commit e5b974c
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Mon Aug 8 15:13:12 2022 -0400

    chore: fee payer event (cosmos#12850) (cosmos#12855)

commit 137bd03
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Sun Aug 7 22:39:42 2022 +0200

    Update REST endpoints for group module documentation (cosmos#12839) (cosmos#12840)

    (cherry picked from commit cfed17e)

    Co-authored-by: lg <[email protected]>

commit 2b616fb
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Sun Aug 7 09:43:59 2022 -0400

    fix(docs): typo in staking/state (cosmos#12834) (cosmos#12835)

    (cherry picked from commit fe89212)

    Co-authored-by: Ari Rubinstein <[email protected]>

commit 1890b8b
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Tue Aug 2 10:26:49 2022 +0200

    feat: Add GetParamSetIfExists to prevent panic on breaking param changes (backport cosmos#12615) (cosmos#12792)

    * feat: Add GetParamSetIfExists to prevent panic on breaking param changes (cosmos#12615)

    * imp(params): Add GetParamSetIfExists to prevent panic on breaking param changes

    * changelog

    * test

    Co-authored-by: Marko <[email protected]>
    (cherry picked from commit 2932e11)

    # Conflicts:
    #	CHANGELOG.md

    * Update CHANGELOG.md

    Co-authored-by: Federico Kunze Küllmer <[email protected]>
    Co-authored-by: Marko <[email protected]>

commit 04e7ab1
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Wed Jul 27 16:46:05 2022 +0200

    feat: Add convenience method for constructing key to access account's balance for a given denom (backport cosmos#12674) (cosmos#12744)

    * feat: Add convenience method for constructing key to access account's balance for a given denom (cosmos#12674)

    This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

    I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

    It would be nice to have a definitive convenience method for constructing the key.

    [Ref.](github.com/celestiaorg/celestia-node/pull/911)

    (cherry picked from commit a1777a8)

    * updates changelog

    Co-authored-by: rene <[email protected]>
    Co-authored-by: Julien Robert <[email protected]>

* Update changelog.

* Update changelog entry with link to PR.

* Standardize the link text for PRs and issues.

* Fix a few lint complaints.
mattverse pushed a commit to osmosis-labs/cosmos-sdk that referenced this pull request Oct 13, 2022
… balance for a given denom (backport cosmos#12674) (cosmos#12745)

* feat: Add convenience method for constructing key to access account's balance for a given denom (cosmos#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>
mattverse added a commit to osmosis-labs/cosmos-sdk that referenced this pull request Oct 13, 2022
… balance for a given denom (backport cosmos#12674) (cosmos#12745) (#352)

* feat: Add convenience method for constructing key to access account's balance for a given denom (cosmos#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>
Co-authored-by: Roman <[email protected]>
mergify bot pushed a commit to osmosis-labs/cosmos-sdk that referenced this pull request Oct 13, 2022
… balance for a given denom (backport cosmos#12674) (cosmos#12745) (#352)

* feat: Add convenience method for constructing key to access account's balance for a given denom (cosmos#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>
Co-authored-by: Roman <[email protected]>
(cherry picked from commit c6b1e6a)
p0mvn pushed a commit to osmosis-labs/cosmos-sdk that referenced this pull request Oct 14, 2022
… balance for a given denom (backport cosmos#12674) (cosmos#12745) (#352) (#365)

* feat: Add convenience method for constructing key to access account's balance for a given denom (cosmos#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>
Co-authored-by: Roman <[email protected]>
(cherry picked from commit c6b1e6a)

Co-authored-by: Matt, Park <[email protected]>
dudong2 pushed a commit to dudong2/lbm-sdk that referenced this pull request Nov 3, 2022
… balance for a given denom (backport #12674) (#12745)

* feat: Add convenience method for constructing key to access account's balance for a given denom (#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>
omritoptix pushed a commit to dymensionxyz/RDK that referenced this pull request Nov 29, 2022
… balance for a given denom (backport #12674) (#12745)

* feat: Add convenience method for constructing key to access account's balance for a given denom (#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

# Conflicts:
#	CHANGELOG.md
#	x/bank/legacy/v043/store.go
#	x/bank/types/keys.go

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>
JeancarloBarrios pushed a commit to agoric-labs/cosmos-sdk that referenced this pull request Sep 28, 2024
… balance for a given denom (backport cosmos#12674) (cosmos#12745)

* feat: Add convenience method for constructing key to access account's balance for a given denom (cosmos#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

# Conflicts:
#	CHANGELOG.md
#	x/bank/legacy/v043/store.go
#	x/bank/types/keys.go

* Update CHANGELOG.md

* fix conflict

Co-authored-by: rene <[email protected]>
Co-authored-by: Marko <[email protected]>
JeancarloBarrios pushed a commit to agoric-labs/cosmos-sdk that referenced this pull request Sep 28, 2024
… balance for a given denom (backport cosmos#12674) (cosmos#12744)

* feat: Add convenience method for constructing key to access account's balance for a given denom (cosmos#12674)

This PR adds a convenience method for constructing the key necessary to query for the account's balance of a given denom.

I ran into this issue since we are using ABCI query now to perform balance requests because we are also requesting merkle proofs for the returned balance [here](https://github.com/celestiaorg/celestia-node/pull/911/files#diff-0ee31f5a7bd88e9f758e6bebdf3ee36365519e55a451098d9638c39afe5eac42R144).

It would be nice to have a definitive convenience method for constructing the key.

[Ref.](github.com/celestiaorg/celestia-node/pull/911)

(cherry picked from commit a1777a8)

* updates changelog

Co-authored-by: rene <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core_and_app Relationship with Core node and Celestia-App area:state Related to fetching state and state execution kind:feat Attached to feature PRs
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Implement balance verification
6 participants